package com.wuyangnju.lj.callcenter.model.server.policy;

import com.wuyangnju.lj.callcenter.model.Buffer;
import com.wuyangnju.lj.callcenter.model.CallCenter;
import com.wuyangnju.lj.callcenter.model.customer.Customer;
import com.wuyangnju.lj.callcenter.model.server.AcceptCustomer;

public class AcceptCustomerPolicyForServer1 implements AcceptCustomer {
	private CallCenter callCenter;

	public AcceptCustomerPolicyForServer1(CallCenter callCenter) {
		this.callCenter = callCenter;
	}

	@Override
	public Customer acceptCustomer() {
		Buffer[] buffers = callCenter.getBuffers();
		return buffers[1].nextInQueue();
	}
}
